package com.ruoyi.system.service.teacher.impl;

import java.util.List;

import com.ruoyi.system.domain.teacher.UserEducation;
import com.ruoyi.system.mapper.teacher.UserEducationMapper;
import com.ruoyi.system.service.teacher.IUserEducationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 教育经历Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-24
 */
@Service
public class UserEducationServiceImpl implements IUserEducationService
{
    @Autowired
    private UserEducationMapper userEducationMapper;

    /**
     * 查询教育经历
     * 
     * @param id 教育经历主键
     * @return 教育经历
     */
    @Override
    public UserEducation selectUserEducationById(Long id)
    {
        return userEducationMapper.selectUserEducationById(id);
    }

    /**
     * 查询教育经历列表
     * 
     * @param userEducation 教育经历
     * @return 教育经历
     */
    @Override
    public List<UserEducation> selectUserEducationList(UserEducation userEducation)
    {
        return userEducationMapper.selectUserEducationList(userEducation);
    }

    /**
     * 新增教育经历
     * 
     * @param userEducation 教育经历
     * @return 结果
     */
    @Override
    public int insertUserEducation(UserEducation userEducation)
    {
        return userEducationMapper.insertUserEducation(userEducation);
    }

    /**
     * 修改教育经历
     * 
     * @param userEducation 教育经历
     * @return 结果
     */
    @Override
    public int updateUserEducation(UserEducation userEducation)
    {
        return userEducationMapper.updateUserEducation(userEducation);
    }

    /**
     * 批量删除教育经历
     * 
     * @param ids 需要删除的教育经历主键
     * @return 结果
     */
    @Override
    public int deleteUserEducationByIds(Long[] ids)
    {
        return userEducationMapper.deleteUserEducationByIds(ids);
    }

    /**
     * 删除教育经历信息
     * 
     * @param id 教育经历主键
     * @return 结果
     */
    @Override
    public int deleteUserEducationById(Long id)
    {
        return userEducationMapper.deleteUserEducationById(id);
    }
    /**
     * 根据用户id查询教育经历
     */
    @Override
    public List<UserEducation> getEducationByUserId(Long userId) {
        return userEducationMapper.getEducationByUserId(userId);
    }
}
